package com.permgmt.utils;

import com.permgmt.entity.model.ResultFormatPaging;

public class ResultPagingUtil {

    /**
     * 分页返回数据格式 成功
     *
     * @param object
     * @return
     */
    public static ResultFormatPaging pagingSuccess(Integer code, Long count, Object object) {
	ResultFormatPaging result = new ResultFormatPaging();
	result.setCode(code);
	result.setCount(count);
	result.setData(object);
	return result;
    }

    /**
     * 分页返回数据格式 错误
     *
     * @param object
     * @return
     */
    public static ResultFormatPaging pagingError(Integer code, Long count, Object object) {
	ResultFormatPaging result = new ResultFormatPaging();
	result.setCode(code);
	result.setCount(count);
	result.setData(object);
	return result;
    }
}
